/**
 * Test algorithms for JettHoughts
 * 
 * Created 12/02/2012
 * 
 * @author Vasili Svirski
 * @version 0.01
 */

package com.jetthoughts.tests;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

import com.jetthoughts.algorithms.Poliandr;

public class PoliandrTest {

	@Test
	public void Test() {
		ArrayList<String> input = new ArrayList<String>();

		input.add("ABBA");
		input.add("ASDA");
		input.add("ASDDSA");
		input.add("ASDSA");
		input.add("assa");

		ArrayList<String> result = Poliandr.isPoliandr(input);
		assertTrue(result.contains("abba"));
		assertFalse(result.contains("asda"));
		assertFalse(result.contains("ABBA"));
		assertTrue(result.contains("assa"));
		assertTrue(result.contains("asddsa"));
		assertTrue(result.contains("asdsa"));
	}
}
